<?php use_helper('jQuery', 'I18N', 'Date') ?>

<div id="editar" title="<?php echo __("Editar Configuracion")?>">
	<?php echo $form->renderHiddenFields(false) ?>

    <div id="empresa">	
	<?php include_partial('formEmpresa', array('form' => $form, 'accion' => 'editar')) ?>
    </div>
    
</div>    
<!-- Script para resaltar los campos en las ventanas emergentes -->
<script language="JavaScript" type="text/javascript">
  	$(function() {
  		var aceptar = function () {
			$('#form_empresa').submit();
  		};
  		var cancelar = function () {
  			$("#editar").dialog("destroy");
			$("#editar").remove();
                        location.href = "<?php echo url_for('@homepage'); ?>";
                };

  		var dialogOpts = {
  			autoOpen: true,
  			width:800,
  			minHeight:450,
  			closeOnEscape: true,
  			modal: true,
  			buttons: {
  	  			"<?php echo __("Guardar")?>": aceptar,
  				"<?php echo __("Cancelar")?>": cancelar,
  			},
  			open: function() {
                            $(this).parents('.ui-dialog-buttonpane button:eq(3)').focus();
                        },
                        resizable: false,
                        close: function() { location.href = "<?php echo url_for('@homepage'); ?>" }
  		};
  		$("#editar").dialog(dialogOpts);
	});
  </script>
